package mx.com.crowdgine.util.math;

import junit.framework.Assert;
import org.junit.Test;

public class MathCommonsTest {
	
	@Test
	public void clampTest(){
		float x=MathCommons.clamp(1.5f, 0, 3);
		Assert.assertEquals(1.5f,x);
		
		x=MathCommons.clamp(1.5f, 2, 3);
		Assert.assertEquals(2.0f,x);
		
		x=MathCommons.clamp(1000.0f, 0, 10);
		Assert.assertEquals(10.0f,x);
	}
}
